<include file="__THEME__/public_header" />
<link href="__APP__/login.css" rel="stylesheet" type="text/css" />
    <div id="page-wrap">
		<div class="reg-wrap find-psd">
          <div class="reg-main">		
			<div class="item-find-psd">
                <div class="title ">{:L('PUBLIC_RESET_PASSWORD')}</div>
                <form model-node="normal_form" method="POST" action="{:U('public/Passport/doResetPassword')}" name="ajax_register_form" id="ajax_register_form">
                    <dl class="form-feedback">
                        <dd>
                            <div class="form-tt">{:L('PUBLIC_NEW_PASSWORD')}：</div>
                            <div class="form-row psd">
                                <div style="overflow:hidden;*zoom:1;">
                                    <input event-node="password" name="password" type="password" value="" style="width:200px;float:left;margin:0 10px 0 0" autocomplete="false"/>
                                    <div model-node="password_weight" class="psw-state-empty">
                                        <div class="progress progress-green-transition"><div class="bar"></div></div>
                                        <div class="txt"><span>{:L('PUBLIC_PASSWORD_WEAK')}</span><span>{:L('PUBLIC_PASSWORD_MIDDLE')}</span><span>{:L('PUBLIC_PASSWORD_STRONG')}</span></div>
                                    </div>
                                </div>
                                <div event-node="password_tips" class="mt5">密码由字母，数字，符号组成，6-15个字符，区分大小写</div>
                            </div>
                        </dd>
                        <dd>
                            <div class="form-tt">{:L('PUBLIC_CONFIRM_PASSWORD')}：</div>
                            <div class="form-row">
                                <input event-node="repassword" name="repassword" type="password" style="width:200px" />
                            </div>
                        </dd>
                        <dd class="mt15">
                            <div class="form-tt"></div>
                            <div class="form-row">
                                <input type="hidden" name="code" value="{$code}" />
                                <input class="btn-green-big" onclick="ajaxPwdFrom();" type="button" value="&nbsp;&nbsp;&nbsp;&nbsp;{:L('PUBLIC_CONFIRM')}&nbsp;&nbsp;&nbsp;&nbsp;" />
                            </div>
                        </dd>
                    </dl>
                </form>
			</div>
           </div>
		</div>
    </div>
<script src="__THEME__/js/module.form.js"></script>
<script type="text/javascript">
/**
 * 异步提交操作
 * @return void
 */
var ajaxPwdFrom = function()
{
    var form = document.getElementById('ajax_register_form');
    M.getJS(THEME_URL + '/js/jquery.form.js', function() {
        var options = {
            dataType: "json",
            success: function(txt) {
                if(1 == txt.status) {
                    ui.success(txt.info);
                    setTimeout(function() {
                        location.href = '<php> echo $GLOBALS['ts']['site']['home_url']; </php>';
                    }, 1500);
                } else {
                    ui.error(txt.info);
                }
            }
        };
        $(form).ajaxSubmit(options);
    });
};
</script>
<include file="__THEME__/public_footer" />